package entity

import "manager/model/po"

type CyclingRecode struct {
	Id int64 `gorm:"column:id;type:BIGINT;primary_key" json:"id"`

	UserId int64 `gorm:"column:user_id;type:BIGINT" json:"user_id"`

	EbikeId int64 `gorm:"column:ebike_id;type:BIGINT" json:"ebike_id"`

	TotalMileage int `gorm:"column:total_mileage;type:TINYINT" json:"total_mileage"`

	MaxRideMileage int `gorm:"column:max_ride_mileage;type:TINYINT" json:"max_ride_mileage"`

	AccompanyDays int `gorm:"column:accompany_days;type:TINYINT" json:"accompany_days"`

	Position po.Point `gorm:"column:position;type:POINT" json:"position"`

	CreatedAt int64 `gorm:"column:created_at;type:BIGINT" json:"created_at"`

	UpdatedAt int64 `gorm:"column:updated_at;type:BIGINT" json:"updated_at"`
}

func (a *CyclingRecode) TableName() string {
	return "cycling_recodes"
}
